package org.jeecg.modules.engineering.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.modules.system.entity.BaseEntity;

@Data
public class EquipDataVO extends BaseEntity {

    private String projectName; // 项目/小区名称

    private String equipName; // 设备名称

    private String equipPosition; // 设备位置

    private String fullCode;  // 设备完整编号 包含项目区域设备编号

    private String name;  // 设备采集项或者事件名称

    private String code; //设备采集项或者事件编码

    private String data; // 数据

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private String startTime;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private String endTime;


    public String getData(){
        if("XF0306".equals(this.code)){
            return "开";
        }else if("XF0307".equals(this.code)){
            return "关";
        }else if("XF0603".equals(this.code)){
            return "开";
        }else if("XF0604".equals(this.code)){
            return "关";
        }else if("XF0703".equals(this.code)){
            return "正常";
        }else if("XF0704".equals(this.code)){
            return "异常";
        }else if("XF0503".equals(this.code)){
            return this.data+"米";
        }else if("XF0A03".equals(this.code)){
            return this.data+"MPa";
        }
        return this.data;
    }

}
